var areaNames = ["district", "city", "province"];
function getAreaId(obj, areaIdObj){
    var areaIdArray  = new Array();
    $(obj).each(function(index, item){
        for(var i in areaNames){
            var selectArea = $(this).find("select[name='"+areaNames[i]+"']").val();
            if(selectArea){
                areaIdArray.push(selectArea);
                break;
            }
        }
    });
    $(areaIdObj).val(areaIdArray.join(","));
}